package com.itita.ww2.model;

import com.itita.ww2.utils.TimeUtil;

/**
 * 任务数据模型
 * @author NorthLan
 *
 */
public class MissionData {
	private String missionId;
	private long firstCMPLTime; // 首次通关时间
	private long lastCMPLTime; // 最近一次通关时间
	private int CMPLTimes; // 通关次数
	// 
	private long firstRushTime; // 首次扫荡时间
	private long lastRushTime; // 最近一次扫荡时间
	private int rushTimes; // 扫荡次数

	public MissionData(String missionId) {
		this.missionId = missionId;
		this.firstCMPLTime = TimeUtil.getUtcNowMillis();
		this.lastCMPLTime = firstCMPLTime;
		this.CMPLTimes = 1;
		//
		this.firstRushTime = 0;
		this.lastRushTime = 0;
		this.rushTimes = 0;
	}

	public void addComplete() {
		this.CMPLTimes++;
		this.lastCMPLTime = TimeUtil.getUtcNowMillis();
	}

	public void addRush() {
		this.rushTimes++;
		this.lastRushTime = TimeUtil.getUtcNowMillis();
	}

	public String getMissionId() {
		return missionId;
	}

	public long getFirstCMPLTime() {
		return firstCMPLTime;
	}

	public long getLastCMPLTime() {
		return lastCMPLTime;
	}

	public int getCMPLTimes() {
		return CMPLTimes;
	}

	public long getFirstRushTime() {
		return firstRushTime;
	}

	public long getLastRushTime() {
		return lastRushTime;
	}

	public int getRushTimes() {
		return rushTimes;
	}

}
